<template>
  <div class="header">
    <el-row>
      <el-col :span="24">
        <div class="grid-content bg-purple-dark">
          <el-button type="primary" plain @click="isShow=!isShow">文字编辑</el-button>
          <el-button type="success" plain>图片编辑</el-button>
          <el-button type="info" plain>图形编辑</el-button>
          <el-button type="warning" plain>表格编辑</el-button>
          <el-button type="danger" plain>动画编辑</el-button>   
        </div>
      </el-col>
    </el-row>
    <quill-editor
      v-show="isShow"
      v-model="content" 
      ref="myQuillEditor" 
      :options="editorOption" 
      @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
      @change="onEditorChange($event)">
    </quill-editor>
  </div>
</template>

<script>
import { quillEditor } from 'vue-quill-editor'
 export default {
  data(){
    return {
        // 文字显示
        isShow: false,
        content:null,
        editorOption:{}
    }
 },
  methods:{
    onEditorBlur () {//失去焦点事件
    },
    onEditorFocus () {//获得焦点事件
    },
    onEditorChange () {//内容改变事件
    }
  }
 }
</script>

<style scoped>
.el-row {
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
  text-align: center
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>